import { post } from '@/utils/request'

// 租户信息查看
export const getTenement = p => post(`/service-system/b/systenant/v1/view`, p)

// 新增租户信息
export const addTenement = p => post(`/service-system/b/systenant/v1/add`, p)

// 修改租户信息
export const modifyTenement = p => post(`/service-system/b/systenant/v1/modify`, p)

// 租户楼栋信息添加
export const addBuild = p => post(`/service-system/b/sysbuild/v1/add`, p)

// 编辑租户楼栋信息
export const modifyBuild = p => post(`/service-system/b/sysbuild/v1/modify`, p)

// 获取租户楼栋信息
export const getBuild = p => post(`/service-system/b/sysbuild/v1/view/${p}`, {})

// 获取租户楼栋信息列表
export const getBuildPageList = p => post(`/service-system/b/sysbuild/v1/list`, {})

// 删除租户楼栋
export const delBuild = p => post(`/service-system/b/sysbuild/v1/del/${p}`, {})

// 租户楼层信息添加
export const addFloor = p => post(`/service-system/b/sysfloor/v1/add`, p)

// 编辑租户楼层信息
export const modifyFloor = p => post(`/service-system/b/sysfloor/v1/modify`, p)

// 获取租户楼层信息
export const getFloor = p => post(`/service-system/b/sysfloor/v1/view/${p}`, {})

// 获取租户楼层信息列表
export const getFloorPageList = p => post(`/service-system/b/sysfloor/v1/list`, {})

// 删除租户楼层
export const delFloor = p => post(`/service-system/b/sysfloor/v1/del/${p}`, {})

// 商户信息新增
export const addShops = p => post(`/service-system/b/sysshops/v1/add`, p)

// 商户信息编辑
export const modifyShops = p => post(`/service-system/b/sysshops/v1/modify`, p)

// 商户信息列表
export const getShopsPageList = p => post(`/service-system/b/sysshops/v1/pageList`, p)

// 获取商户信息
export const getShops = p => post(`/service-system/b/sysshops/v1/view/${p}`, {})

// 删除商户信息
export const delShops = p => post(`/service-system/b/sysshops/v1/del/${p}`, {})

// 商户主体维护
// 列表 /service-system/b/leasee/v1/pageList
export const lesseePageList = p => post(`/service-system/b/leasee/v1/pageList`, p)
// 保存 /service-system/b/leasee/v1/save
export const lesseeSave = p => post(`/service-system/b/leasee/v1/save`, p)
// 查看 /service-system/b/leasee/v1/view/{id}
export const lesseeDetails = p => post(`/service-system/b/leasee/v1/view/${p}`, p)
// 查看 /service-system/b/leasee/v1/view/{id}
export const queryLeaseeByShopId = p => post(`/service-system/b/leasee/v1/queryLeaseeByShopId/${p}`, p)
// 删除 /service-system/b/leasee/v1/del/{id}
export const lesseeDel = p => post(`/service-system/b/leasee/v1/del/${p}`, p)
// 商户主体模糊搜索 /service-system/b/leasee/v1/list
export const lesseeList = p => post(`/service-system/b/leasee/v1/list`, p)

// 业态/品牌风格 列表查询 1:业态 2品牌风格
export const getBrandStylePageList = p => post(`/service-system/b/system/unifiedTree/v1/list`, p)

// 业态/品牌风格新增
export const addBrandStyle = p => post(`/service-system/b/system/unifiedTree/v1/add`, p)

// 业态/品牌风格编辑
export const modifyBrandStyle = p => post(`/service-system/b/system/unifiedTree/v1/modify`, p)

// 业态/品牌风格详情
export const getBrandStyle = p => post(`/service-system/b/system/unifiedTree/v1/view/${p}`, {}, 'get')

// 删除业态/品牌风格
export const delBrandStyle = p => post(`/service-system/b/system/unifiedTree/v1/del/${p}`, {}, 'get')

// 修改业态/品牌风格状态
export const changeBrandStyleStatus = p => post(`/service-system/b/system/unifiedTree/v1/changeStatus/${p.id}/${p.status}`, {}, 'get')
// 删除商户
export const delShop = p => post(`/service-system/b/sysshops/v1/del/${p.id}`, p)

// 获取业态/品牌风格树形有效列表
export const getVersionstatTreeList = p => post(`/service-system/b/system/unifiedTree/v1/effectiveList/${p.type}/${p.parentId}`, {}, 'get')

// 全局端租户查询
export const getTenant = p => post(`/service-system/b/globaltenant/v1/queryTenantById`, p)
// 保存
export const getTenantSave = p => post(`/service-system/b/globaltenant/v1/modifyTenant`, p)
// 保存
export const getTenantExtendSave = p => post(`/service-system/b/globaltenant/v1/updateTenantExtendInfo`, p)
// 全局端租户详情查询
export const getDetailByTenantId = p => post(`/service-system/b/globaltenant/v1/queryDetailByTenantId/${p.type}`, p)
// 保存租户详情
export const getTenantDetailSave = p => post(`/service-system/b/globaltenant/v1/addOrUpdateTenantDetail`, p)
// 租户公司信息查询
export const getCompany = p => post(`/service-system/b/globaltenant/v1/queryEnterpriseInfoByTenantId`, p)

// 租户公司信息修改
export const modifyCompany = p => post(`/service-system/b/globaltenant/v1/modifyEnterpriseInfo`, p)

// 租户法人查询
export const getLegalPerson = p => post(`/service-system/b/globaltenant/v1/queryLegalInfoByTenantId`, p)

// 租户法人修改
export const modifyLegalPerson = p => post(`/service-system/b/globaltenant/v1/modifyLegalInfo`, p)

// 商户状态修改
export const changeStatus = p => post(`/service-system/b/sysshops/v1/changeStatus/${p.id}/${p.status}`, p)
